<!DOCTYPE html>
<html>
<?php require 'header.php'; ?>
<body>

<?php require 'title.php'; ?>

<div class="layui-content" style="padding-top: 0px;">
    <div class="layui-container">
        <div class="layui-row">

            <?php require 'step.php'; ?>

            <div class="layui-col-md12">
                <div class="layui-card layui-fixed">
                    <div class="layui-card-header">
                        <span>1 运行环境检测</span>
                        <span class="layui-card-version"><?= $versionInfo['code'] ?></span>
                    </div>
                    <div class="layui-card-body">
                        <table class="layui-table" lay-skin="nob">
                            <thead>
                            <tr>
                                <th>检测项</th>
                                <th>所需环境</th>
                                <th>当前环境</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>php</td>
                                <td>8.0+</td>
                                <td><?= $phpv ?></td>
                            </tr>
                            <tr>
                                <td>mysqli</td>
                                <td>模块</td>
                                <td>
                                    <?php echo $mysql; ?>
                                </td>
                            </tr>
                            <tr>
                                <td>curl</td>
                                <td>扩展</td>
                                <td>
                                    <?php echo $curl; ?>
                                </td>
                            </tr>
                            <tr>
                                <td>gd</td>
                                <td>扩展</td>
                                <td>
                                    <?php echo $gd; ?>
                                </td>
                            </tr>
                            <tr>
                                <td>fileinfo</td>
                                <td>扩展</td>
                                <td>
                                    <?php echo $fileinfo; ?>
                                </td>
                            </tr>
                            <tr>
                                <td>exif</td>
                                <td>扩展</td>
                                <td>
                                    <?php echo $exif; ?>
                                </td>
                            </tr>
                            <tr>
                                <td>gd</td>
                                <td>扩展</td>
                                <td>
                                    <?php echo $gd; ?>
                                </td>
                            </tr>
                            <tr>
                                <td>openssl</td>
                                <td>扩展</td>
                                <td>
                                    <?php echo $openssl; ?>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-center" style="margin: 60px auto;">
                        <button type="button" onclick="window.history.go(-1);"
                                class="layui-btn layui-btn-normal layui-btn-radius"
                                style="border-radius:5px !important;">上一步
                        </button>
                        <button id="step" type="button" class="layui-btn layui-btn-normal layui-btn-radius"
                                style="border-radius:5px !important;">下一步
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<?php require 'footer.php'; ?>

</body>


<script type="text/javascript">
    layui.use(['jquery', 'layer'], function () {
        var layer = layui.layer;
        var jquery = layui.jquery;

        jquery('#stepOne').addClass('layui-active');

        var passOne = <?= $passOne ?>;

        jquery('#step').click(function () {
            if (passOne) {
                window.location.href = "./index.php?step=2";
            } else {
                layer.msg('环境异常');
            }
        })
    })
</script>
</html>